<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>VIP尊享</title>
</head>
<body>
    <h1>尊敬的VIP欢迎宁</h1>
    <span>
            <a th:if="${session.loginUser==null}" href="http://login.zkjshop.com:9000/view/login?target=http://vip.zkjshop.com:9020/view/vip">登录</a>
            <a th:unless="${session.loginUser==null}" href="http://www.zkjshop.com:9000/login/out" onclick="out()" >退出</a>
    </span>
    <p th:unless="${session.loginUser == null}">
        <span style="color: deepskyblue" th:text="${session.loginUser.userName}"></span>已登录
    </p>

</body>
<script>
    function out(){
        alert("退出成功，请重新登录")
    }
</script>
</html>